

find_package( Boost COMPONENTS system date_time)
include_directories( ${Boost_INCLUDE_DIRS} ) 
link_directories(/root/montavista/imx6x-std-adk/armv7a-mv-linux/usr/lib/)

#find_package( OpenCL REQUIRED )
find_package( OpenCV REQUIRED )

message(STATUS "opencv lib:  ${OpenCV_LIBS} opencl lib: ${OPENCL_LIBRARIES}")

add_executable( BGR2Z BGR2Z_looper.cpp )
add_executable( cl_convertGray cl_convertGray.cpp )
add_executable( cl_convertXYZ cl_convertXYZ.cpp )
add_executable( cl_checkID NDExperiment.cpp )
add_executable( new_cl_XYZ new_cl_XYZ.cpp )
add_executable( RGB2ZWrapper RGB2ZWrapper.cpp )

target_link_libraries( BGR2Z ${OPENCL_LIBRARIES} OpenCL ${OpenCV_LIBS} ${Boost_LIBRARIES})
target_link_libraries( cl_convertGray ${OPENCL_LIBRARIES} OpenCL ${OpenCV_LIBS} ${Boost_LIBRARIES})
target_link_libraries( cl_convertXYZ ${OPENCL_LIBRARIES} OpenCL ${OpenCV_LIBS} ${Boost_LIBRARIES})
target_link_libraries( cl_checkID ${OPENCL_LIBRARIES} OpenCL ${OpenCV_LIBS} ${Boost_LIBRARIES})
target_link_libraries( new_cl_XYZ ${OPENCL_LIBRARIES} OpenCL ${OpenCV_LIBS} ${Boost_LIBRARIES})
target_link_libraries( RGB2ZWrapper ${OPENCL_LIBRARIES} OpenCL ${OpenCV_LIBS} ${Boost_LIBRARIES})


#configure_file(cl_convert.cl ${CMAKE_CURRENT_BINARY_DIR}/Htest1elloWorld.cl COPYONLY)